*Paper: Fiscal Rules, Corruption and Electoral Accountability - Replication Files

clear all
cap log close 
set more off


**Global files
global folder "/Users/tommasogiommoni/Dropbox/Determinants of corruption/Stability pact and corruption/Replication files JOP"


********************************************************************************
****----						Dataset open 					    	----**** 
********************************************************************************

use "$folder/Data/dataset_feb2024.dta", clear

**-- Global

global controls7 proportion_female_Elected_lag av_education_Elected_lag av_age_Elected_lag  victory_margin_lag term_limit_lag 
global controls7_int  c.proportion_female_Elected_lag##i.anno c.av_education_Elected_lag##i.anno c.av_age_Elected_lag##i.anno c.victory_margin_lag##i.anno  c.term_limit_lag##i.anno
global controls8_int  c.proportion_female_Elected_lag##i.anno c.av_age_Elected_lag##i.anno

**-- Panel dataset

xtset codcom anno
fvset base 2012 anno

********************************************************************************
****----						Analysis 					    		----**** 
********************************************************************************

****---- Analysis omitting the distance to the threshold (columns 1-2) ----****

qui reghdfe corruption_PC_sd S##T i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store reg1
qui reghdfe corruption_exp_log_sd S##T i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store reg2

****---- Including province-year FE (columns 3-4) ----****

qui reghdfe corruption_PC_sd S##T P $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom province_year) vce(cluster codcom)
est store reg3
qui reghdfe corruption_exp_log_sd S##T P $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom province_year) vce(cluster codcom)
est store reg4

****---- With province clustering (columns 5-6) ----****

qui reghdfe corruption_PC_sd S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster province_year)
est store reg5
qui reghdfe corruption_exp_log_sd S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster province_year)
est store reg6

****---- With region clustering (columns 7-8) ----****

qui reghdfe corruption_PC_sd S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster regione)
est store reg7
qui reghdfe corruption_exp_log_sd S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster regione)
est store reg8

****---- With municipality/province-year clustering (columns 9-10) ----****

qui reghdfe corruption_PC_sd S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom province_year)
est store reg9
qui reghdfe corruption_exp_log_sd S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom province_year)
est store reg10

****---- Table ----****

esttab reg1 reg2 reg3 reg4 reg5 reg6 reg7 reg8 reg9 reg10 using "$folder/Tables/TableA11.tex", compress keep(1.S#1.T ) se r2 staraux collabels(, none) ml(,none) cells(b(star fmt (%9.3f)) se(par)) star(* 0.10 ** 0.05 *** 0.01) replace




